package com.wang.entity;

import org.junit.jupiter.api.DynamicTest;
import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author 19225
 * @create 2020/11/25 23:40
 */
public class test {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
        Student student = (Student) context.getBean("student");
        student.show();
    }
    @Test
    public void t()
    {
        ApplicationContext context =  new ClassPathXmlApplicationContext("bean.xml");
        User user = context.getBean("user2",User.class);
        System.out.println(user);
    }
}
